/*
 *    Copyright (C) 2011-2012 Hai Bison
 *
 *    See the file LICENSE at the root directory of this project for copying
 *    permission.
 */


package group.pals.mailgate.beans;

/**
 *
 * @author Hai Bison
 */
public class ItemEmailProvider {

    private String name;
    private String emailPattern;
    private String imapHost;
    private int imapPort;
    private boolean useSSL;

    public ItemEmailProvider(String name, String emailPattern, String imapHost, int imapPort, boolean useSSL) {
        this.name = name;
        this.emailPattern = emailPattern;
        this.imapHost = imapHost;
        this.imapPort = imapPort;
        this.useSSL = useSSL;
    }

    public ItemEmailProvider() {
        //
    }

    /**
     * 
     * @return the provider's name.
     */
    @Override
    public String toString() {
        return getName();
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     * @return <code>ItemEmailProvider</code>
     */
    public ItemEmailProvider setName(String name) {
        this.name = name;
        return this;
    }

    /**
     * @return the emailPattern
     */
    public String getEmailPattern() {
        return emailPattern;
    }

    /**
     * @param emailPattern the emailPattern to set
     * @return <code>ItemEmailProvider</code>
     */
    public ItemEmailProvider setEmailPattern(String emailPattern) {
        this.emailPattern = emailPattern;
        return this;
    }

    /**
     * @return the IMAP host
     */
    public String getImapHost() {
        return imapHost;
    }

    /**
     * @param imapHost the IMAP host to set
     * @return <code>ItemEmailProvider</code>
     */
    public ItemEmailProvider setImapHost(String imapHost) {
        this.imapHost = imapHost;
        return this;
    }

    /**
     * @return the IMAP port
     */
    public int getImapPort() {
        return imapPort;
    }

    /**
     * @param imapPort the IMAP port to set
     * @return <code>ItemEmailProvider</code>
     */
    public ItemEmailProvider setImapPort(int imapPort) {
        this.imapPort = imapPort;
        return this;
    }

    /**
     * @return the useSSL
     */
    public boolean isUseSSL() {
        return useSSL;
    }

    /**
     * @param useSSL the useSSL to set
     * @return <code>ItemEmailProvider</code>
     */
    public ItemEmailProvider setUseSSL(boolean useSSL) {
        this.useSSL = useSSL;
        return this;
    }
}
